package cn.lhjl.day09.单例模式.懒汉模式;

public class TowLockDanLi {
    private volatile static TowLockDanLi danLi = null;

    private TowLockDanLi() {
    }

    public  static TowLockDanLi getInstance() {
        if (danLi == null) {
            synchronized (TowLockDanLi.class) {
                if (danLi==null){
                    danLi = new TowLockDanLi();
                }
            }
        }
        return danLi;
    }

}
